home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)U / (A)U5.ADF / Virus_Checker / Virus_Checker.ARP.asm < prev    next >
Assembly Source File  |  1988-08-11  |  22KB  |  712 lines

  1. ****     Virus Checker           ***
  2. ***   Checks for SCA virus, Byte Bandit Virus and Non-Standard Boot Blocks **
  3. ***   Based on the idea and code from Steve Tibbett on Fish #136    **
  4. **    Only this is much smaller and done in assembly language     **
  5. **    Please   send me any more viruses so I can update this      **
  6. **    John Veldthuis
  7. **    21 Ngatai Street
  8. **    Manaia, Taranaki
  9. **    New Zealand
  10.  
  11. **    Placed in the Public domain libraries to help all get rid of Viruses **
  12.  
  13.    include  "exec/types.i"
  14.    include  "libraries/arpbase.i"
  15.    include  "intuition/intuition.i"
  16.    include  "devices/trackdisk.i"
  17.    include  "exec/memory.i"
  18.  
  19.    xref     _LVOOpenLibrary
  20.    xref     _LVOCloseLibrary
  21.    xref     _LVOFindTask
  22.    xref     _LVOSetTaskPri
  23.    xref     _LVODoIO
  24.    xref     _LVOOpenDevice
  25.    xref     _LVOCloseDevice
  26.    xref     _LVOOpenWindow
  27.    xref     _LVOCloseWindow
  28.    xref     _LVOSetAPen
  29.    xref     _LVOSetBPen
  30.    xref     _LVOSetDrMd
  31.    xref     _LVOSetWindowTitles
  32.    xref     _LVORawDoFmt
  33.    xref     _LVOWait
  34.    xref     _LVOGetMsg
  35.    xref     _LVOReplyMsg
  36.    xref     _LVOAutoRequest
  37.  
  38.  
  39. Start:
  40.       moveq.l  #0,d6          ;zero no. viruses found
  41.       moveq.l  #0,d5          ;zero no. disks installed
  42.       moveq.l  #0,d4          ;zero no. disks checked
  43.       movem.l  a0/d0,-(sp)    ;save command line
  44.       move.l   4,a6
  45.       moveq.l  #33,d0         ;version 33 or greater
  46.       lea      Arp(pc),a1
  47.       jsr      _LVOOpenLibrary(a6) ;open arp.library
  48.       tst.l    d0
  49.       bne.s    1$
  50.       add.w    #8,sp
  51.       move.l   #20,d0         ;no library, indicate error and stop
  52.       rts
  53. 1$    move.l   d0,a5          ;arpbase for later
  54.       movem.l  (sp)+,a0/d0    ;get command line back
  55.       lea      Help(pc),a1
  56.       lea      CheckDisks(pc),a2
  57.       lea      TPlate(pc),a3
  58.       exg      a5,a6
  59.       jsr      _LVOGADS(a6)   ;parse command line
  60.       move.l   #100,d0
  61.       jsr      _LVOArpAlloc(a6)  ;allocate 100 bytes of memory
  62.       exg      a5,a6             ;for formatting strings
  63.       tst.l    d0
  64.       beq      Error
  65.       move.l   d0,Mem1
  66.       sub.l    a1,a1
  67.       jsr      _LVOFindTask(a6)  ;get our task
  68.       move.l   d0,Task           ;save for later
  69.       move.l   d0,a1
  70.       move.l   #19,d0
  71.       jsr      _LVOSetTaskPri(a6);set our task to priorty 19
  72.       move.l   d0,OldPri         ;save old priority
  73.       moveq.l  #0,d0
  74.       move.l   d0,a0
  75.       exg      a5,a6
  76.       jsr      _LVOCreatePort(a6);create a reply port
  77.       exg      a5,a6
  78.       tst.l    d0
  79.       beq      Error
  80.       move.l   d0,d3
  81.       move.l   d0,Port           ;save for closing later
  82.       move.l   #IOSTD_SIZE,d0
  83.       exg      a6,a5
  84.       jsr      _LVOArpAlloc(a6)  ;allocate some memory for IO block
  85.       exg      a6,a5
  86.       tst.l    d0
  87.       beq      Error
  88.       move.l   d0,a0
  89.       move.b   #NT_MESSAGE,LN_TYPE(a0)
  90.       move.w   #IOSTD_SIZE,MN_LENGTH(a0)
  91.       move.l   d3,MN_REPLYPORT(a0)
  92.       move.l   d0,DiskReq        ;save IO block address
  93.       moveq.l  #3,d3
  94. Loop  lea      TrackName(pc),a0
  95.       move.l   d3,d0
  96.       move.l   DiskReq,a1
  97.       moveq.l  #0,d1
  98.       jsr      _LVOOpenDevice(a6);open up trackdisk.device
  99.       tst.l    d0
  100.       bgt.s    Cont
  101.       move.w   #TD_CHANGENUM,IO_COMMAND(a1)
  102.       jsr      _LVODoIO(a6)      ;find out change count for all drives
  103.       move.l   IO_ACTUAL(a1),d0
  104.       lea     ChangeCount(pc),a0
  105.       move.l   d3,d1
  106.       lsl.l    #2,d1
  107.       add.l    d1,a0
  108.       move.l   d0,(a0)           ;set current change count
  109.       jsr      _LVOCloseDevice(a6)
  110. Cont  dbra     d3,Loop           ;do 4 drives
  111.       lea      MyNewWindow(pc),a0
  112.       move.l   IntuiBase(a5),a6  ;get cached intuitionbase from arp.library
  113.       jsr      _LVOOpenWindow(a6);open up our window
  114.       move.l   4,a6              ;restore ExecBase
  115.       tst.l    d0
  116.       beq      Error
  117.       move.l   d0,MyWindow       ;save for later
  118.       move.l   d0,a0
  119.       move.l   wd_RPort(a0),d0   ;get window rastport, saves time later
  120.       move.l   d0,RPort
  121.       move.l   wd_UserPort(a0),d0
  122.       move.l   d0,UserPort       ;also get userport
  123.       move.l   d0,a0
  124.       moveq.l  #0,d0
  125.       move.b   MP_SIGBIT(a0),d0 ;get this ports signal number
  126.       moveq.l  #1,d1
  127.       lsl.l    d0,d1            ;convert into a mask
  128.       move.l   d1,Signal        ;and save
  129.       move.l   #1536,d0
  130.       move.l   #MEMF_CHIP!MEMF_CLEAR,d1
  131.       exg      a5,a6
  132.       jsr      _LVOArpAllocMem(a6)  ;allocate buffer for disk read
  133.       exg      a5,a6
  134.       tst.l    d0
  135.       beq      Error
  136.       move.l   d0,Buffer          ;save for later
  137.       lea      CheckDisks(pc),a0  ;get flag from command line
  138.       tst.l    (a0)               ;will  we test the drives no
  139.       beq.s    3$
  140.       moveq.l  #3,d3              ;yes
  141.       lea      ChangeCount(pc),a0
  142. 4$    move.l   (a0),d0
  143.       cmp.l    #-1,d0             ;is current count -1
  144.       bne.s    11$
  145.       addq.w   #4,a0              ;yes, then no drive here
  146.       bra.s    12$
  147. 11$   move.l   #1000,(a0)+        ;otherwise set count to 1000
  148. 12$   dbra     d3,4$              ;do all drives attached
  149.       bsr      CheckBlock         ;and check disks
  150. 3$    move.l   RPort,a1           ;get our rast port
  151.       moveq.l  #1,d0
  152.       move.l   GfxBase(a5),a6     ;get graphics base from ARP
  153.       jsr      _LVOSetAPen(a6)
  154.       moveq.l  #0,d0
  155.       jsr      _LVOSetBPen(a6)
  156.       moveq.l  #RP_JAM2,d0
  157.       jsr      _LVOSetDrMd(a6)
  158. MainLoop:                         ;where the work is done
  159.       move.l   4,a6
  160.       lea      FmtString(pc),a0
  161.       move.l   d6,-(sp)
  162.       move.l   d5,-(sp)
  163.       move.l   d4,-(sp)
  164.       move.l   sp,a1
  165.       lea      Format1(pc),a2
  166.       move.l   Mem1,a3
  167.       jsr      _LVORawDoFmt(a6)   ;format screen title string
  168.       add.w    #12,sp
  169.       move.l   IntuiBase(a5),a6   ;from ARP
  170.       move.l   MyWindow,a0           ;pointer to window
  171.       moveq.l  #-1,d0
  172.       move.l   d0,a1             ;don't change window title
  173.       move.l   Mem1,a2           ;change screen title only
  174.       jsr      _LVOSetWindowTitles(a6)
  175.       move.l   4,a6
  176. Lp    move.l   UserPort,a0
  177.       jsr      _LVOGetMsg(a6)    ;see if any messages at our port
  178.       tst.l    d0
  179.       bne.s    Act
  180.       move.l   Signal,d0         ;no then we will wait for one
  181.       jsr      _LVOWait(a6)
  182.       bra.s    Lp
  183. Act   move.l   d0,a1             ;yes, lets see what it is
  184.       move.l   im_Class(a1),d3   ;copy class
  185.       jsr      _LVOReplyMsg(a6)  ;reply to these fast
  186.       cmp.l    #CLOSEWINDOW,d3   ;shall we close down
  187.       beq.s    EndofLoop
  188.       cmp.l    #DISKINSERTED,d3  ;or has someone put a disk in
  189.       bne.s    MainLoop          ;no, well thats all we want
  190.       bsr.s    CheckBlock        ;yes lets check it out
  191.       bra.s    MainLoop
  192. EndofLoop:
  193.       move.l   Task,a0
  194.       move.l   OldPri,d0
  195.       jsr      _LVOSetTaskPri(a6) ;restore old priority
  196.       move.l   IntuiBase(a5),a6
  197.       move.l   MyWindow,a0
  198.       jsr      _LVOCloseWindow(a6) ;close our window
  199.       exg      a5,a6
  200.       move.l   Port,a1
  201.       jsr      _LVODeletePort(a6)  ;delete our port
  202.       moveq.l  #0,d0
  203.       jsr      _LVOArpExit(a6)     ;indicate a clean return
  204.                                    ;arp doesn't come back from here
  205. CheckBlock:
  206.       bsr      WhoChanged          ;find out which drive is involved
  207.       cmp.l    #-1,d0              ;no more drives to check
  208.       beq      Return
  209.       move.b   d0,Unit             ;save drive number
  210.       addq.l   #1,d4                ;add one to number checked
  211.       lea      TrackName(pc),a0
  212.       move.l   DiskReq,a1
  213.       moveq.l  #0,d1
  214.       jsr      _LVOOpenDevice(a6)  ;open trackdisk on unit
  215.       tst.l    d0
  216.       bgt.s    CheckBlock          ;won't open, try next drive
  217.       move.l   DiskReq,a1
  218.       move.w   #CMD_READ,IO_COMMAND(a1)
  219.       move.l   Buffer,d0
  220.       move.l   d0,IO_DATA(a1)
  221.       move.l   #1536,IO_LENGTH(a1)
  222.       move.l   #0,IO_OFFSET(a1)
  223.       jsr      _LVODoIO(a6)        ;read boot block into buffer
  224.       move.l   DiskReq,a1
  225.       move.w   #TD_MOTOR,IO_COMMAND(a1)
  226.       move.l   #0,IO_LENGTH(a1)
  227.       jsr      _LVODoIO(a6)        ;turn motor off
  228.       move.l   DiskReq,a1
  229.       move.b   IO_ERROR(a1),d3     ;see what error there was
  230.       jsr      _LVOCloseDevice(a6)
  231.       cmp.b    #19,d3
  232.       bgt.s    CheckBlock           ;if an error try next drive
  233.       move.l   #255,d1
  234.       moveq.l  #0,d2
  235.       move.l   Buffer,a0
  236. 1$    move.l   d2,d3
  237.       move.l   (a0)+,d0
  238.       add.l    d0,d2
  239.       cmp.l    d2,d3
  240.       ble.s    2$
  241.       addq.l   #1,d2
  242. 2$    dbra     d1,1$             ; compute checksum on block
  243.       tst.l    d2                ;if not zero then this will not boot
  244.       bne      Return          ;not a booting disk
  245.       move.l   Buffer,a1
  246.       add.w    #12,a1
  247.       move.l   (a1),d0
  248.       cmp.l    #$41FAFFF2,d0     ;check for SCA virus
  249.       bne.s    NextCheck
  250.       addq.l   #1,d6             ;another SCA virus found
  251.       bra.s    DisplaySCA        ;display message
  252. NextCheck:
  253.       move.l   Buffer,a1
  254.       add.w    #32,a1
  255.       move.l   (a1),d0
  256.       cmp.l    #'Band',d0        ;check for Byte Bandit virus
  257.       bne.s    CheckBoot
  258.       addq.l   #1,d6             ;found one
  259.       bra.s    DisplayBYT        ;display message
  260. CheckBoot:
  261.       move.l   Buffer,a1
  262.       addq.w   #8,a1
  263.       lea      BootBlock+8(pc),a2
  264.       moveq.l  #10,d3
  265. 1$    move.l   (a1)+,d0          ;otherwise see if the block is a 
  266.       move.l   (a2)+,d1          ;standard booting disk
  267.       cmp.l    d0,d1
  268.       bne.s    DisplayNstd       ;it isn't, then display message
  269.       dbra     d3,1$             ;okay it is, next disk
  270.       bra      CheckBlock        ;see it any more disks changed
  271. DisplaySCA:
  272.       move.b   Unit,d0
  273.       add.b    #'0',d0           ;set unit number on message
  274.       lea      TEXTPTR+23(pc),a0
  275.       move.b   d0,(a0)
  276.       move.l   MyWindow,a0
  277.       lea      SCABody(pc),a1
  278.       lea      Pos(pc),a2
  279.       lea      Neg1(pc),a3
  280. Disp2 moveq.l  #0,d0
  281.       move.l   d0,d1
  282.       move.l   #340,d2
  283.       move.l   #75,d3
  284.       move.l   IntuiBase(a5),a6
  285.       jsr      _LVOAutoRequest(a6) ;ask remove or ignore
  286.       move.l   4,a6
  287.       tst.l    d0
  288.       beq.s    Okay1               ;okay ignore it
  289.       bsr      DoInstall           ;otherwise get rid of it
  290. Okay1 bra      CheckBlock
  291. DisplayBYT:
  292.       move.b   Unit,d0
  293.       add.b    #'0',d0
  294.       lea      TEXTPTR+23(pc),a0
  295.       move.b   d0,(a0)
  296.       move.l   MyWindow,a0
  297.       lea      BYTBody(pc),a1
  298.       lea      Pos(pc),a2
  299.       lea      Neg1(pc),a3
  300.       bra      Disp2         ;same here but why use the same code twice
  301. DisplayNstd:
  302.       lea      NBCTEXT(pc),a0
  303.       add.w    #23,a0
  304.       move.b   Unit,d0
  305.       add.b    #'0',d0
  306.       move.b   d0,(a0)
  307.       move.l   MyWindow,a0
  308.       lea      Body1,a1
  309.       lea      PosD(pc),a2
  310.       lea      Neg1(pc),a3
  311.       moveq.l  #0,d0
  312.       moveq.l  #0,d1
  313.       move.l   #320,d2
  314.       move.l   #75,d3
  315.       move.l   IntuiBase(a5),a6
  316.       jsr      _LVOAutoRequest(a6); tell user of Non-Standard block
  317.       move.l   4,a6
  318.       tst.l    d0
  319.       beq      CheckBlock           ;Ignore it go check next drive
  320.       exg      a5,a6
  321.       lea      FileName(pc),a0
  322.       move.l   a0,d1
  323.       move.l   #MODE_NEWFILE,d2
  324.       jsr      _LVOOpen(a6)         ;open up a console window
  325.       exg      a5,a6
  326.       tst.l    d0
  327.       beq      Cont3           ;error open window goto next requester
  328.       move.l   d0,File         ;save for later
  329.       exg      a5,a6
  330.       link     a5,#-30         ;get some space for string
  331.       move.l   sp,Buff
  332.       moveq.l  #12,d2          ;12 lines
  333.       move.l   Buffer,a2
  334. 5$    moveq.l  #24,d3          ;of 24 characters
  335.       move.l   Buff,a3         ;get our stack space
  336. 4$    moveq.l  #0,d0
  337.       move.b   (a2)+,d0
  338.       cmp.b    #' ',d0         ;if < space print a '.'
  339.       blt.s    1$
  340.       cmp.b    #'~',d0         'if > '~'  print a '.'
  341.       ble.s    2$
  342. 1$    move.b   #'.',(a3)+
  343.       bra.s    3$
  344. 2$    move.b   d0,(a3)+
  345. 3$    move.l   d0,-(sp)
  346.       move.l   sp,a1
  347.       lea      Fmt1(pc),a0
  348.       move.l   File,d0
  349.       jsr      _LVOFPrintf(a6) ;print out hex value of number
  350.       add.w    #4,sp
  351.       dbra     d3,4$
  352.       move.b   #0,(a3)
  353.       move.l   Buff,a1
  354.       move.l   a1,-(sp)
  355.       move.l   sp,a1
  356.       lea      Fmt2(pc),a0
  357.       move.l   File,d0
  358.       jsr      _LVOFPrintf(a6) ;print out string of characters
  359.       add.w    #4,sp
  360.       dbra     d2,5$
  361.       unlk     a5              ;return stack space
  362.       exg      a5,a6
  363. Cont3 lea      NBCTEXT(pc),a0
  364.       add.w    #23,a0
  365.       move.b   Unit,d0
  366.       add.b    #'0',d0
  367.       move.b   d0,(a0)
  368.       move.l   MyWindow,a0
  369.       lea      Body1,a1
  370.       lea      Pos(pc),a2
  371.       lea      Neg1(pc),a3
  372.       moveq.l  #0,d0
  373.       moveq.l  #0,d1
  374.       move.l   #320,d2
  375.       move.l   #75,d3
  376.       move.l   IntuiBase(a5),a6
  377.       jsr      _LVOAutoRequest(a6) ;get more input from user
  378.       move.l   4,a6
  379.       move.l   d0,-(sp)
  380.       exg      a5,a6
  381.       move.l   File,d1
  382.       jsr      _LVOClose(a6)       ;close console device
  383.       exg      a5,a6
  384.       move.l   (sp)+,d0
  385.       tst.l    d0
  386.       beq      CheckBlock
  387.       bsr.s    DoInstall          ;clear block if user wants to
  388.       bra      CheckBlock         ;any more to do
  389.  
  390. DoInstall:
  391.       move.l   IntuiBase(a5),a6
  392.       move.l   MyWindow,a0
  393.       lea      REWBody(pc),a1
  394.       lea      REWPos(pc),a2
  395.       lea      REWNeg(pc),a3
  396.       moveq.l  #0,d0
  397.       moveq.l  #0,d1
  398.       move.l   #320,d2
  399.       move.l   #75,d3
  400.       jsr      _LVOAutoRequest(a6) ;last warning
  401.       move.l   4,a6
  402.       tst.l    d0
  403.       beq      Return              ;no, make up your mind
  404.       addq.l   #1,d5             ;disks installed +1
  405.       move.l   Buffer,a0
  406.       move.l   #256,d3
  407.       moveq.l  #0,d0
  408. 1$    move.l   d0,(a0)+          ;zero buffer
  409.       dbra     d3,1$
  410.       move.l   Buffer,a0
  411.       lea      BootBlock(pc),a1
  412.       moveq.l  #12,d3
  413. 2$    move.l   (a1)+,(a0)+         ;copy standard boot block to buffer
  414.       dbra     d3,2$
  415.       lea      TrackName(pc),a0
  416.       move.l   DiskReq,a1
  417.       move.b   Unit,d0
  418.       ext.w    d0
  419.       ext.l    d0
  420.       moveq.l  #0,d1
  421.       jsr      _LVOOpenDevice(a6) ;open correct drive
  422.       tst.l    d0
  423.       bgt      Return
  424. 4$    move.l   DiskReq,a1
  425.       move.w   #TD_PROTSTATUS,IO_COMMAND(a1)
  426.       jsr      _LVODoIO(a6)       ;check write protect tab
  427.       move.l   DiskReq,a1
  428.       move.l   IO_ACTUAL(a1),d0
  429.       tst.l    d0
  430.       beq.s    3$
  431.       move.l   IntuiBase(a5),a6
  432.       move.l   MyWindow,a0
  433.       lea      ERRBody(pc),a1
  434.       lea      ERRPos(pc),a2
  435.       lea      ERRNeg(pc),a3
  436.       moveq.l  #0,d0
  437.       moveq.l  #0,d1
  438.       move.l   #320,d2
  439.       move.l   #75,d3
  440.       jsr      _LVOAutoRequest(a6) ;ask user to take protect off
  441.       move.l   4,a6
  442.       tst.l    d0
  443.       bne.s    4$
  444.       move.l   DiskReq,a1
  445.       jsr      _LVOCloseDevice(a6) ;or ignore the block again
  446.       bra      Return
  447. 3$    move.l   DiskReq,a1
  448.       move.l   #1024,IO_LENGTH(a1)
  449.       move.l   Buffer,a0
  450.       move.l   a0,IO_DATA(a1)
  451.       move.w   #CMD_WRITE,IO_COMMAND(A1)
  452.       move.l   #0,IO_OFFSET(A1)
  453.       jsr      _LVODoIO(a6)        ;write block out to disk
  454.       move.l   DiskReq,a1
  455.       move.w   #CMD_UPDATE,IO_COMMAND(A1)
  456.       jsr      _LVODoIO(a6)        ;flush data to disk
  457.       move.l   DiskReq,a1
  458.       move.b   IO_ERROR(a1),d3     ;get error condition
  459.       move.w   #TD_MOTOR,IO_COMMAND(A1)
  460.       move.l   #0,IO_LENGTH(a1)
  461.       jsr      _LVODoIO(a6)        ;turn off drive
  462.       move.l   DiskReq,a1
  463.       jsr      _LVOCloseDevice(a6) ;shut down device
  464.       cmp.b    #19,d3
  465.       ble.s    5$
  466.       lea      ErrorND(pc),a1      ;if error > 19 then nothing done
  467.       bra.s    6$
  468. 5$    lea      Healed(pc),a1       ;otherwise it was healed
  469. 6$    move.l   MyWindow,a0
  470.       moveq.l  #-1,d0
  471.       move.l   d0,a3
  472.       move.l   IntuiBase(a5),a6
  473.       jsr      _LVOSetWindowTitles(a6);set window title
  474.       move.l   DosBase(a5),a6
  475.       moveq.l  #100,d1
  476.       jsr      _LVODelay(a6)       ;delay for 2 seconds
  477.       move.l   IntuiBase(a5),a6
  478.       move.l   MyWindow,a0
  479.       lea      TITLETEXT(pc),a1
  480.       moveq.l  #-1,d0
  481.       move.l   d0,a3
  482.       jsr      _LVOSetWindowTitles(a6) ;restore window title
  483.       move.l   4,a6
  484. Return:
  485.       rts
  486.  
  487.  
  488.  
  489.  
  490. WhoChanged:
  491.       moveq.l  #3,d3
  492. Loop1 move.l   d3,d0
  493.       lsl.l    #2,d0
  494.       lea      ChangeCount(pc),a0
  495.       add.l    d0,a0
  496.       move.l   (a0),d0
  497.       cmp.l    #-1,d0
  498.       beq.s    Cont2
  499.       lea      TrackName(pc),a0
  500.       move.l   d3,d0
  501.       lea      DiskReq(pc),a1
  502.       move.l   (a1),a1
  503.       moveq.l  #0,d1
  504.       jsr      _LVOOpenDevice(a6)
  505.       tst.l    d0
  506.       bgt.s    Cont2
  507.       lea      DiskReq(pc),a1
  508.       move.l   (a1),a1
  509.       move.w   #TD_CHANGESTATE,IO_COMMAND(a1)
  510.       jsr      _LVODoIO(a6)
  511.       lea      DiskReq(pc),a1
  512.       move.l   (a1),a1
  513.       tst.l    IO_ACTUAL(a1)
  514.       bne.s    Cont1
  515.       move.w   #TD_CHANGENUM,IO_COMMAND(a1)
  516.       jsr      _LVODoIO(a6)
  517.       lea      DiskReq(pc),a1
  518.       move.l   (a1),a1
  519.       lea      ChangeCount(pc),a2
  520.       move.l   d3,d0
  521.       lsl.l    #2,d0
  522.       add.l    d0,a2
  523.       move.l   IO_ACTUAL(a1),d0
  524.       move.l   (a2),d1
  525.       cmp.l    d0,d1
  526.       beq.s    Cont1
  527.       move.l   d0,(a2)
  528.       jsr      _LVOCloseDevice(a6)
  529.       move.l   d3,d0
  530.       rts
  531. Cont1 jsr      _LVOCloseDevice(a6)
  532. Cont2 dbra     d3,Loop1
  533.       move.l   #-1,d0         ;return noone changed
  534.       rts
  535.  
  536.  
  537. Error:
  538.          exg      a5,a6
  539.          moveq.l  #20,d0      ;indicate error
  540.          moveq.l  #103,d1     ;indicate not enough memory error
  541.          jsr      _LVOArpExit(a6)
  542.                               ;arp doesn't come back from here
  543.  
  544. Format1  move.b   d0,(a3)+    ;this is used by _LVORawDoFmt
  545.          rts
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553. ChangeCount dc.l  $ffffffff
  554.             dc.l  $ffffffff
  555.             dc.l  $ffffffff
  556.             dc.l  $ffffffff
  557. File        dc.l  0
  558. Buff        dc.l  0
  559. Port        dc.l  0
  560. Signal      dc.l  0
  561. UserPort    dc.l  0
  562. Mem1        dc.l  0
  563. Buffer      dc.l  0
  564. RPort       dc.l  0
  565. MyWindow    dc.l  0
  566. DiskReq     dc.l  0
  567. Task        dc.l  0
  568. OldPri      dc.l  0
  569. CheckDisks  dc.l  0
  570. MyNewWindow dc.w  128,0,300,10
  571.             dc.b  0,1
  572.             dc.l  DISKINSERTED!CLOSEWINDOW!VANILLAKEY!MOUSEBUTTONS
  573.             dc.l  WINDOWDRAG!WINDOWDEPTH!RMBTRAP!WINDOWCLOSE!NOCAREREFRESH
  574.             dc.l  0,0,TITLETEXT,0,0
  575.             dc.w  0,0,0,0,WBENCHSCREEN
  576. Unit        dc.b  0
  577.             dc.b  0
  578. BootBlock   dc.b  'DOS',0,$c0,$20,$0f,$19,0,0,3,$70,$43,$fa,0,$18
  579.             dc.b  $4e,$ae,$ff,$a0,$4a,$80,$67,$0a,$20,$40,$20,$68
  580.             dc.b  0,$16,$70,0,$4e,$75,$70,$ff,$60,$fa,$64
  581.             dc.b  $6f,$73,$2e,$6c,$69,$62,$72,$61,$72,$79,0,0,0,0,0
  582. TITLETEXT   dc.b  'Virus    Checker:',0
  583. Help        dc.b  'CHECK = Check drives on Startup',0
  584. TPlate      dc.b  'CHECK/S',0
  585. Fmt1        dc.b  '%02lx',0
  586. Fmt2        dc.b  '  %s',10,0
  587. FmtString   dc.b  'Virus Checker: Disks Checked: %ld Disks Installed %ld Viruses Found: %ld',0
  588. FileName    dc.b  'CON:0/70/640/130/Hex Dump',0
  589. Arp         dc.b  'arp.library',0
  590. TrackName   dc.b  'trackdisk.device',0
  591. NonStd      dc.b  'Nonstandard Boot Code!',0
  592. Display     dc.b  'Display It',0
  593. Ignore      dc.b  'Ignore  It',0
  594. Remove      dc.b  'Remove  It',0
  595. Retry       dc.b  'Retry',0
  596. Yes         dc.b  'Yes',0
  597. No          dc.b  'No',0
  598. Cancel      dc.b  'Cancel',0
  599. SCAV        dc.b  'infected with an SCA Virus!!',0
  600. BYTV        dc.b  'infected with the Byte Bandit Virus!',0
  601. WrtPro      dc.b  'Write Protected.',0
  602. DiskERR     dc.b  'DISK ERROR: Disk is',0
  603. Bootsec     dc.b  'Rewrite the boot sectors?',0
  604. Rewrite     dc.b  'Are you sure you want to',0
  605. NBCTEXT     dc.b  'Danger:  The disk in DF9: has',0
  606. TEXTPTR     dc.b  'Danger:  The disk in DF9: is',0
  607. ErrorND     dc.b  'Error,  Nothing Done.',0
  608. Healed      dc.b  'Disk Healed.',0
  609.  
  610. def_font    dc.b  'topaz.font',0
  611.  
  612.  
  613.             cnop  0,2
  614.  
  615. TxtAt_Plain dc.l  def_font
  616.             dc.w  8
  617.             dc.b  FS_NORMAL,FPF_ROMFONT
  618. Body2       dc.b  0,1,RP_JAM2,0
  619.             dc.w  20,18
  620.             dc.l  TxtAt_Plain
  621.             dc.l  NonStd
  622.             dc.l  0
  623. Body1       dc.b  0,1,RP_JAM2,0
  624.             dc.w  20,8
  625.             dc.l  TxtAt_Plain
  626.             dc.l  NBCTEXT
  627.             dc.l  Body2
  628. PosD        dc.b  0,1,RP_JAM2,0
  629.             dc.w  7,3
  630.             dc.l  TxtAt_Plain
  631.             dc.l  Display
  632.             dc.l  0
  633. Neg1        dc.b  0,1,RP_JAM2,0
  634.             dc.w  7,3
  635.             dc.l  TxtAt_Plain
  636.             dc.l  Ignore
  637.             dc.l  0
  638. Pos         dc.b  0,1,RP_JAM2,0
  639.             dc.w  7,3
  640.             dc.l  TxtAt_Plain
  641.             dc.l  Remove
  642.             dc.l  0
  643. SCABody2    dc.b  0,1,RP_JAM2,0
  644.             dc.w  20,18
  645.             dc.l  TxtAt_Plain
  646.             dc.l  SCAV
  647.             dc.l  0
  648. SCABody     dc.b  0,1,RP_JAM2,0
  649.             dc.w  20,8
  650.             dc.l  TxtAt_Plain
  651.             dc.l  TEXTPTR
  652.             dc.l  SCABody2
  653. BYTBody2    dc.b  0,1,RP_JAM2,0
  654.             dc.w  20,18
  655.             dc.l  TxtAt_Plain
  656.             dc.l  BYTV
  657.             dc.l  0
  658. BYTBody     dc.b  0,1,RP_JAM2,0
  659.             dc.w  20,8
  660.             dc.l  TxtAt_Plain
  661.             dc.l  TEXTPTR
  662.             dc.l  BYTBody2
  663. ERRBody2    dc.b  0,1,RP_JAM2,0
  664.             dc.w  20,18
  665.             dc.l  TxtAt_Plain
  666.             dc.l  WrtPro
  667.             dc.l  0
  668. ERRBody     dc.b  0,1,RP_JAM2,0
  669.             dc.w  20,8
  670.             dc.l  TxtAt_Plain
  671.             dc.l  DiskERR
  672.             dc.l  ERRBody2
  673. ERRPos      dc.b  0,1,RP_JAM2,0
  674.             dc.w  7,3
  675.             dc.l  TxtAt_Plain
  676.             dc.l  Retry
  677.             dc.l  0
  678. ERRNeg      dc.b  0,1,RP_JAM2,0
  679.             dc.w  7,3
  680.             dc.l  TxtAt_Plain
  681.             dc.l  Cancel
  682.             dc.l  0
  683. REWBody2    dc.b  0,1,RP_JAM2,0
  684.             dc.w  20,18
  685.             dc.l  TxtAt_Plain
  686.             dc.l  Bootsec
  687.             dc.l  0
  688. REWBody     dc.b  0,1,RP_JAM2,0
  689.             dc.w  20,8
  690.             dc.l  TxtAt_Plain
  691.             dc.l  Rewrite
  692.             dc.l  REWBody2
  693. REWPos      dc.b  0,1,RP_JAM2,0
  694.             dc.w  7,3
  695.             dc.l  TxtAt_Plain
  696.             dc.l  Yes
  697.             dc.l  0
  698. REWNeg      dc.b  0,1,RP_JAM2,0
  699.             dc.w  7,3
  700.             dc.l  TxtAt_Plain
  701.             dc.l  No
  702.             dc.l  0
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.             end
  710.  
  711.  
  712.